home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 February
/
1986-02.d64
/
demo 1_vic
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
51 lines
99 ifa=0thena=1:load"vblinkobj",8,1
100 poke56,28:poke55,0:clr
110 v1=1:v2=2:co=646:hi=28
130 pokev1,0:pokev2,hi
140 rem ** usr() is at $c000, $3c00 on the +4/16, $1c00 for vic **
150 sd=16384: rem ** set delay flag
160 db=8192 : rem ** disable blink
170 eb=4096 : rem ** enable blink
180 sb=2048 : rem ** stop color from blinking
190 mb=1024 : rem ** make color start blinking
200 vb=512 : rem ** return value of blinking color
210 rc=256 : rem ** reset all colors-no blinking
220 rem *** now we demonstrate blink
230 rd$="[221][144]**** red ****[221]":gr$="[221][144]*** green ***[221]":print"[147]"
240 poke36879,8
270 x=usr(eb):if x=0 then530: rem ** enable blinkmode
280 c$=rd$
290 gosub450
300 x=usr(mb+(16*2)+0):rem ** black blinks to red
310 x=usr(mb+(16*3)+1):rem * white blinks to cyan
320 x=usr(mb+(16*7)+4):rem ** make purple blink to yellow
330 x=usr(sd+14): rem ** set blink speed
340 print:print"[156] *** warning *** "
350 print:print"hit a key to change"
360 gosub530
370 x=usr(sb+0):rem ** stop black from blinking to red
380 x=usr(vb+0):if x<>0 then380:rem ** wait until black reset
390 x=usr(mb+(16*5)+0):rem ** now blink black to green
400 c$=gr$:gosub450
410 gosub530
420 x=usr(sb+0):rem ** stop black from blinking to green
430 x=usr(vb+0):if x<>0 then430:rem ** wait until black reset
440 goto280
450 print"attention - attention":print
460 print"[144] condition code "
470 print" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][201] "
480 print" [221] [221] "
490 print" "c$
500 print" [221] [221] "
510 print" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][203] "
520 return
530 tx=10:ty=20
540 get a$:ty=ty-1:if ty<0 then ty=20:x=usr(sd+tx):tx=tx-1:if tx=0 then tx=1
550 ct$=" ":if tx/2=int(tx/2)then ct$="[209]"
560 print""
570 x=usr(vb+0):rem ** now find the color black is blinking to
580 pokeco,x:rem ** change current character color to blinking color
590 printtab(ty);ct$;
600 if a$="" then540
610 x=usr(sd+14):return